//
//  Height.m
//  MXの衣柜
//
//  Created by 马霄 on 15/8/14.
//  Copyright (c) 2015年 霄 马. All rights reserved.
//

#import "Height.h"

@implementation Height
+(CGFloat)getTextHeight:(NSString *)text Wid:(CGFloat)wid Font:(CGFloat)font
{
    CGRect rect = [text boundingRectWithSize:CGSizeMake(wid, 3000) options:(NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName :[UIFont systemFontOfSize:font]} context:nil];
    return rect.size.height;
}

+ (CGSize)getTextSize:(NSString *)text Wid:(CGFloat)wid Font:(CGFloat)font
{
    CGRect rect = [text boundingRectWithSize:CGSizeMake(wid, 3000) options:(NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName :[UIFont systemFontOfSize:font]} context:nil];
    return rect.size;
}


@end
